﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Sunny.UI;
using System.Net;
using System.Net.Sockets;

namespace IndustryFieldCommunication
{
    public partial class FormMain : UIAsideMainFrame
    {
        public FormMain()
        {
            InitializeComponent();
            ConnectManager = new FConnectManage(this, Aside);
            var page = this.AddPage(ConnectManager, 0);
            Aside.SetNodePageIndex(Aside.Nodes[0], page.PageIndex);

            //调试用
            /*
            IPHostEntry ipHostInfo = Dns.GetHostEntry(Dns.GetHostName());
            IPAddress ipAddress = ipHostInfo.AddressList[0];
            Socket client = new Socket(ipAddress.AddressFamily,
                SocketType.Stream, ProtocolType.Tcp);
            page = new FEPPallet(client);
            var id = Guid.NewGuid();
            var node = Aside.CreateNode(AddPage(page, id));
            //this.RemovePage(id);
            //Aside.Nodes.Remove(node);*/
        }

        FConnectManage ConnectManager;
    }
}
